import request from '@/utils/request'

/**
 * 分页获取数据
 * @param {*} params
 * @returns
 */
export function getBookPageList(params) {
  return request({
    url: '/BookMgr/GetPageList',
    method: 'post',
    data: params,
  })
}

/**
 * 添加
 * @param {any} book 书籍信息
 * @returns
 */
export function add(book) {
  return request({
    url: '/BookMgr/Add',
    method: 'post',
    data: book,
  })
}
/**
 * 修改
 * @param {any} book 书籍信息
 * @returns
 */
export function modify(book) {
  return request({
    url: '/BookMgr/Modify',
    method: 'post',
    data: book,
  })
}

/**
 * 删除书籍
 * @param {*} bookId 书籍ID
 * @returns
 */
export function deleteBook(bookId) {
  return request({
    url: '/BookMgr/Delete',
    method: 'post',
    data: { id: bookId },
  })
}
